package de.fuberlin.inf.alp3.ue09.a2;

import de.fuberlin.inf.alp3.utils.ConsoleInput;

public class GraphTest {
    public static void main(String[] args) {
        Graph g = new GraphImpl(11);
        g.add(8, 1, 5);
        g.add(9, 1, 1);
        g.add(7, 1, 2);
        g.add(7, 3, 1);
        g.add(7, 2, 1);
        g.add(3, 10, 4);
        g.add(3, 4, 1);
        g.add(4, 5, 5);
        g.add(4, 6, 6);
        g.add(5, 6, 2);
        g.add(2, 6, 1);
        g.add(2, 11, 3);
        System.out.println("The graph object has been created.");

        Graph.Path shortest = g.shortestPath(
                ConsoleInput.readInt("Where do you want to start?",
                        "Enter the integer, representing the starting node!"),
                        ConsoleInput.readInt("Where do you want to go?",
                        "Enter the integer, representing the end node!"));
        System.out.println("The shortest way will be " + shortest);
    }
}
